home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000085_icon-group-sender _Mon Oct 20 08:09:52 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
1KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id IAA26475
for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Mon, 20 Oct 1997 08:09:50 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA19175; Mon, 20 Oct 1997 08:09:49 -0700
To: icon-group@cs.arizona.edu
Date: Sun, 19 Oct 1997 15:44:33 +1000
From: Stuart.Robinson@anu.edu.au (Stuart Robinson)
Message-Id: <Stuart.Robinson-1910971544360001@asianstmg-221.anu.edu.au>
Organization: ANU
Sender: icon-group-request@cs.arizona.edu
Subject: counting letters
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
What would be the best way to design an Icon program that takes a text
file as input, counts up the instances of every letter in the alphabet
(ignoring other characters and distinguishing between uppercase and
lowercase letters), and spits out the results of the count as output?
For example, the following input
abcdefghjijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()
would produce the following output
a 1
b 2
[etc.]
A 1
b 2
[etc.]
[nothing for the non-alphabetic characters]
Cheers,
Stuart Robinson
--
Stuart Robinson <Stuart.Robinson@no-spam.anu.edu.au>
The Australian National University
*TO REPLY, REMOVE "no-spam." FROM E-MAIL ADDRESS GIVEN ABOVE